import Api from "/@/api/Api";

import ApiConfig from "/@/api/ApiConfig";
import {UnwrapRef} from "vue";

export default class UserApi extends Api {
    static getPage(params: UnwrapRef<SysUserTableType["param"]>) {
        return this.get({
            url: ApiConfig.SYSTEM.USER_PAGE,
            params: params
        });
    }

    static getList(params: Map<string, Object>) {
        return this.get({
            url: ApiConfig.SYSTEM.USER_LIST,
            params: params
        });
    }



    static insert(user: RowUserType) {
        return this.post({
            url: ApiConfig.SYSTEM.USER,
            data: user,
        });
    }

    static update(user: RowUserType) {
        return this.put({
            url: ApiConfig.SYSTEM.USER,
            data: user
        });
    }

    static view(id: string) {
        return this.get({
            url: ApiConfig.SYSTEM.USER,
            params: {id: id}
        });
    }

    static remove(ids: string) {
        return this.delete({
            url: ApiConfig.SYSTEM.USER,
            params: {ids: ids}
        });
    }
}